enum search_result {
	SRCH_DONE,
	SRCH_NO_KEY
};

struct field_data {
	int key_id;
	char *data_start;
	char *data_end;
};

struct bounds {
	const char *beginptr;
	const char *endptr;
};

struct key_search {
	int k_count;
	struct field_data *sorted;
	struct field_data *fld_srch;
	const char **key_names;
	struct bounds *res_dict;
};

enum search_result
keys_search(const char *markup, struct key_search *query);

